let mapleader=' '

" --------------------------- plug setting -------------------
nnoremap == :Autoformat<CR>

nnoremap <leader>to :NERDTree<CR>
nnoremap <leader>tc :NERDTreeClose<CR>
nnoremap <leader>tn :NERDTreeCWD<CR>

" --------------------------- normal setting -------------------
nnoremap <leader>x :x<CR>

" close search highlight
nnoremap <leader>s :nohls<CR>

inoremap {<CR> {<CR>}<esc>O

noremap H _
noremap L $

nnoremap J <c-o> " backward
nnoremap K <c-i> " forward

" insert a new line
nnoremap <leader>o  o<esc>k
nnoremap <leader>O  O<esc>j

" inoremap {<CR> {<CR>}<Esc>ko

nnoremap <leader>j  <C-W>j
nnoremap <leader>h  <C-W>h
nnoremap <leader>l  <C-W>l
nnoremap <leader>k  <C-W>k

"Ctrl-A selet all
nnoremap  <C-A>  ggvG$

nnoremap <leader>1 1gt
nnoremap <leader>2 2gt
nnoremap <leader>3 3gt
nnoremap <leader>4 4gt
nnoremap <leader>5 5gt
nnoremap <leader>6 6gt
nnoremap <leader>7 7gt
nnoremap <leader>8 8gt
nnoremap <leader>9 9gt
